def getYinZ(num):
    res = []
    for i in range(1,num):
        if num % i ==0:
            res.append(i)
    return res

if __name__=="__main__":

    for i in range(1,10001):
         yinziLst = getYinZ(i)
         if i == sum(yinziLst):
             print(i)